import React,{useState,useEffect} from "react"
import { observer, inject } from 'mobx-react'

const CnodeMobx = props => {
    console.log('props', props);
    let { cnode } = props.store
    let data = {
        page: 1,
        tab: '',
        limit: 10
    }
    useEffect(()=>{
        cnode.getList(data)
        return
        ()=>{

        }
    },[])
    return (
        <div>
            {
                cnode.list.map(ele=>(
                    <div key={ele.id}>
                        <span>{ele.id}</span>
                        --
                        <span>{ele.title}</span>
                    </div>
                ))
            }
        </div>
    )
}
export default inject('store')(observer(CnodeMobx))